#方法一
# lst=[1,4,9,16,2,5,10,15]
# newlist=[]
# for i in (range(0,len(lst)-1)):
#     newlist.append(lst[i]+lst[i+1])
# print(newlist)



##方法二
lst=[1,4,9,16,2,5,10,15]
newlist= [ lst[i]+lst[i+1] for i in (range(0,len(lst)-1))]
